package com.chartHandle.dubbo.exposureInterface;

import com.alibaba.dubbo.config.annotation.Service;
import com.chartHandle.excelService.service.ReadOrderInfoService;
import com.chartHandle.excelService.service.ReadWeeklySupplyStrategyService;
import com.dubboInterface.merchant.chartHandleInterface.ExcelRead;
import com.projectCommon.bean.easyExcel.CSVSmokeInfo;
import com.projectCommon.bean.easyExcel.putTactics.WeeklySupplyStrategyData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;


/**
 * @author 吴宇~
 * @motto 我亦无他，唯手熟尔。
 * @edition jdk1.8
 * @reflection 0-1 喧闹任其喧闹，自由我自为之，我自风情万种，与世无争。
 * @date 2024/12/01/14:44
 * @target 心若有所向往，何惧道阻且长
 */
@Service
@Component
public class ExcelReadInterface implements ExcelRead {
    @Autowired
    private ReadWeeklySupplyStrategyService weeklySupplyStrategyService;
    @Autowired
    private ReadOrderInfoService orderInfoService;

    @Override
    public WeeklySupplyStrategyData readWeeklySupplyStrategyData(byte[] fileByte, String fileName) {
        return weeklySupplyStrategyService.readSupplyStrategyData(fileByte, fileName);
    }
    @Override
    public List<CSVSmokeInfo> readOrderCsvFileInfo(byte[] csvByte) {
        return orderInfoService.getOrderPictureByCSVOrderFile(csvByte);
    }
}
